<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" errorPage="/error.jsp" isELIgnored="false" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>
<%@ taglib uri="http://atleap.blandware.com/taglib" prefix="atleap" %>
<html:xhtml />

<atleap:constants className="com.blandware.atleap.webapp.util.core.WebappConstants" var="CONTENT_LOCALES_COLLECTION_KEY" scope="page" />

<atleap:content identifier="information" ignore="true" />
<table cellpadding="0" cellspacing="0" border="0" class="tableView">
	<tr>
		<th>
			<atleap:message key="questionnaire.answerOption.form.title" />
		</th>
		<td>
			<atleap:iterator items="${sessionScope[pageScope.CONTENT_LOCALES_COLLECTION_KEY]}" var="contentLocale">
				<div class="readOnlyField">
					<atleap:fieldValue valueMap="${contentLocale.title}" var="languageTitle" />
					<c:if test="${empty languageTitle}">
						<c:set var="languageTitle" value="${contentLocale.identifier}" />
					</c:if>
					${languageTitle}:&nbsp;<atleap:fieldValue valueMap="${requestScope.answerOption.title}" language="${contentLocale.identifier}" complexSearch="false" />
				</div>
			</atleap:iterator>
		</td>
	</tr>
</table>
<atleap:form action="questionnaire/answerOption/callUpdate" method="POST" validateOnSubmit="false">
    <html:hidden property="id" value="${requestScope.answerOption.id}" />
    <c:if test="${!requestScope.answerOption.question.questionnaire.fixed}">
        <atleap:isUserInRole roles="questionnaire-answerOption-update">
            <atleap:submit styleClass="button"><atleap:message key="core.commons.buttons.callUpdate" /></atleap:submit>
        </atleap:isUserInRole>
    </c:if>
    <atleap:cancel styleClass="button"><atleap:message key="core.commons.buttons.showList" /></atleap:cancel>
</atleap:form>
